package com.snpic.appaw.module.third.api.deepORC;

import com.snpic.appaw.framework.common.pojo.CommonResult;
import com.snpic.appaw.module.third.api.deepOCR.DeepOCRApi;
import com.snpic.appaw.module.third.api.deepOCR.dto.*;
import com.snpic.appaw.module.third.api.sms.dto.SmsReqDTO;
import com.snpic.appaw.module.third.api.sms.dto.SmsRespDTO;
import com.snpic.appaw.module.third.service.deepOCR.DeepOCRService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JiJun
 * @date 2025/9/11 10:47
 * @修改时间 2025/9/11 10:47
 * @description
 */
@RestController // 提供 RESTful API 接口，给 Feign 调用
@Validated
public class DeepOCRApiImpl implements DeepOCRApi {
	@Resource
	private DeepOCRService deepOCRService;

	/**
	 * 行驶证(正页识别)
	 *
	 * @param reqDTO
	 */
	@Override
	public CommonResult<VehicleLicenseRespDTO> vehicleLicense(VehicleLicenseReqDTO reqDTO) {
		VehicleLicenseRespDTO respDTO = deepOCRService.vehicleLicense(reqDTO);
		return CommonResult.success(respDTO);
	}

	/**
	 * 行驶证(副页识别)
	 *
	 * @param reqDTO
	 */
	@Override
	public CommonResult<VeBackRespDTO> veBack(VeBackReqDTO reqDTO) {

		return null;
	}

	/**
	 * 身份证结构化识别V1
	 * 返回结果显示正反面
	 *
	 * @param reqDTO
	 */
	@Override
	public CommonResult<IdCardRespDTO> idCard(IdCardReqDTO reqDTO) {
		IdCardRespDTO respDTO = deepOCRService.idCard(reqDTO);
		return CommonResult.success(respDTO);
	}
}
